Simple and Fast Biased Locks
ثبت نشده
چکیده
Locks are typically used to ensure exclusive access to shared memory locations. Unfortunately, lock operations are expensive, so much work has been done on optimizing their performance for common access patterns. One such pattern found for e.g., is in networking applications, where there is a single thread dominating lock accesses. An important trivial case of this occurs when a single-threaded program calls a thread-safe library that uses locks. An effective way to optimize this dominant-thread pattern is to “bias” the lock implementation so that accesses by the dominant thread have negligible overhead. We take this approach in this work: we simplify and generalize existing techniques for biased locks, producing a large design space with many trade-offs. For example, if we assume the dominant process acquires the lock infinitely often (a reasonable assumption for packet processing), it is possible to make the dominant process perform a lock operation without expensive fence or compare-and-swap instructions. This gives a very low overhead solution; we confirm its efficacy by experiments. We show how these constructions can be extended for lock reservation, re-reservation, and to reader-writer situations.
منابع مشابه
Hierarchical Backoff Locks for Nonuniform Communication Architectures
This paper identifies node affinity as an important property for scalable general-purpose locks. Nonuniform communication architectures (NUCAs), for example CCNUMAs built from a few large nodes or from chip multiprocessors (CMPs), have a lower penalty for reading data from a neighbor’s cache than from a remote cache. Lock implementations that encourages handing over locks to neighbors will impr...
متن کاملA Comparative Study on the Mechanism, Form and Decorations of Contemporary Chaleshtor Locks and Those from the Safavid Isfahan
Lock is a device that assures safety of human’s life. Iranian locksmiths, in addition to making locks and meeting the essential needs, valued the decorative aspects of such tools. Including pendants and movable types, these locks are portable and they are different from standard, ordinary ones. Artists in this field have incorporated a wide range of artistic, spiritual, cultural and aesthetic v...
متن کاملPriority Inheritance Spin Locks for Multiprocessor Real-Time Systems
When a real-time system is realized on a shared-memory multiprocessor, priority-ordered spin locks are often required to reduce priority inversions. However, simple priority-ordered spin locks can cause uncontrolled priority inversions when they are used for nested spin locks. This paper points out the problem of uncontrolled priority inversions in the context of spin locks and proposes priorit...
متن کاملA A Scalable Lock Manager for Multicores
Modern implementations of DBMS software are intended to take advantage of high core counts that are becoming common in high-end servers. However, we have observed that several database platforms, including MySQL, Shore-MT, and a commercial system, exhibit throughput collapse as load increases into over-saturation (where there are more request threads than cores), even for a workload with little...
متن کاملTRINITY COLLEGE Shared Memory Concurrency and Fast, Biased Locks
Declaration I hereby declare that this project is entirely my own work and that it has not been submitted as an exercise for a degree at this or any other university. I agree that the Library and other agents of the College may lend or copy this thesis upon request. ____________________________ ___________ Jimmy Cleary Date 4 Acknowledgements I would like to thank my supervisor, Dr David Gregg,...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009